package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/13.
 */
public class QuizConcernAction extends AHttpService<PbBean.PbResQuestionAddConcern> {
    private int quizId;

    private QuizConcernAction(Context context, int quizId) {
        super(context);
        this.quizId = quizId;
    }

    public static QuizConcernAction newInstance(Context context, int quizId) {
        return new QuizConcernAction(context, quizId);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionAddConcern.Builder builder = PbBean.PbReqQuestionAddConcern.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setQuestionId(quizId);

        return apiService.quizConcern(builder.build());
    }

    public interface ConcernType{
        int ADD_CONCENRN=0;
        int CANCEL_CONCERN=1;
    }

}
